﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.IDAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class MasterContactPartnerBLL : IBLLMasterContactPartner
    {
        private static readonly IDALMasterContactPartner dal = DataAccess.CreateMasterContactPartner();

        public MasterContactPartnerBLL()
        {

        }

        public IList<MasterContactPartnerInfo> GetMasterContactPartner()
        {
            return dal.GetMasterContactPartner();
        }

        public IList<MasterContactPartnerInfo> GetMasterContactPartner(string record_status)
        {
            return dal.GetMasterContactPartner(record_status);
        }

        public MasterContactPartnerInfo GetMasterContactPartner(int seq)
        {
            return dal.GetMasterContactPartner(seq);
        }

        public IList<MasterContactPartnerInfo> GetMasterContactPartnerWithParent(int contact_seq)
        {
            return dal.GetMasterContactPartnerWithParent(contact_seq);
        }

        public void Insert(MasterContactPartnerInfo info)
        {
            try
            {
                dal.Insert(info);
            }
            catch
            {
                throw;
            }
        }

        public void Insert(IList<MasterContactPartnerInfo> infoList, int contact_seq, IDBManager dbManagerTrans)
        {
            try
            {
                dal.Insert(infoList, contact_seq, dbManagerTrans);
            }
            catch
            {
                throw;
            }
        }

        public void Update(MasterContactPartnerInfo info)
        {
            try
            {
                dal.Update(info);
            }
            catch
            {
                throw;
            }
        }

        public void Delete(MasterContactPartnerInfo info)
        {
            try
            {
                dal.Delete(info);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteAll(IList<MasterContactPartnerInfo> infoList)
        {
            try
            {
                dal.DeleteAll(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteFromDB(IList<MasterContactPartnerInfo> infoList)
        {
            try
            {
                dal.DeleteFromDB(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void Restore(IList<MasterContactPartnerInfo> infoList)
        {
            try
            {
                dal.Restore(infoList);
            }
            catch
            {
                throw;
            }
        }
    }
}
